import { useEffect, EffectCallback, DependencyList } from "react";

export const useMount = (
  callback: EffectCallback,
  params: DependencyList = []
) => {
  useEffect(() => {
    callback();
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, params);
};
